<?php
    include("../inc/functions.php");
    include("../inc/db.class.php");
    include("../inc/connection.php");

    $database = new database();
    $email = mysql_escape_string($_POST['email']);
    $return_data='';
    $nmbr = $_POST["recaptcha_challenge_field"];
    $response =  $_POST["recaptcha_response_field"];
    $query="select captcha_value from captcha where captcha_number='$nmbr'";
    $rec = $database->query($query);
    $res = mysql_fetch_object($rec);

    if ($res->captcha_value != $response) {
      $return_data.='ic_';
    }
  
  
    //email validation
    if (!filter_var($email, FILTER_VALIDATE_EMAIL))
    $return_data.='ie_';
      
    /* email exsitance */
    $searchEmail="select email from users where email='$email'";
    $database1=new database();
    $rec = $database->query($searchEmail);
    $res = mysql_fetch_object($rec);
    if(count($res->email)>0)
    $return_data.='ee_';

    echo $return_data;
?>